DeferredTask
#include <OSUtils.h>
QElemPtr qLink; 4 0 Address of next queue element short qType; 2 4 Always dtQType
short dtFlags; 2 6 (not used)
long dtParm; 4 12 Optional parameter
long dtReserved; 4 16 (not used; set to 0)
Notes: The Deferred Task Manager lets you put off the execution of lengthy
tasks until all interrupts at the current interrupt level have been serviced.
These tasks are executed with interrupts enabled, but are subject to the
same restrictions regarding moving memory and preserving registers as
interrupt routines.By calling DTInstall, you can set up a queue, place the information describing your interrupt task in that queue, and let the task
run when the processor would otherwise be idle.
In the DeferredTask structure, QLink points to the next en queued item, while QType is always a dtQType, a standard Operating System queue. The
dtParm field is there to let you pass an optional parameter in assembly
language. The parameter would be loaded into register A1 immediately
prior to task execution.
This structure is currently not declared in Apple header files. You can
either declare the structure yourself or access the fields via a QElemPtr using assembly language.